package demo;

import java.util.Scanner;

/**
 * @Author liangzai
 * @Description:
 */
public class Training {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String string = scanner.next();
        int[] arr = new int[26];
        int len = string.length();
        int max = 0;
        for (int i = 0; i < len; i++) {
            int val = string.charAt(i);
            arr[val-65]++;
            max = Math.max(max, arr[val-65]);
        }
        for (int i = 0; i < 26; i++) {
            if(arr[i]==max) {
                System.out.print((char)(i+65));
            }
        }
    }
}
